using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Windows.Forms;

namespace InvocationRegisterTestInstaller
{
    [RunInstaller(true)]
    public class Installer: Microsoft.ConnectionEngine.Common.Install.Installer
    {
        public override void Install(System.Collections.IDictionary stateSaver)
        {
            string maindirectory = this.Context.Parameters["assemblypath"];
            maindirectory = maindirectory.Substring(0, maindirectory.LastIndexOf("\\"));

            //MessageBox.Show(this.Context.Parameters["webserverhost"] + " - " +
            //    this.Context.Parameters["itrwebsitename"] + " - " +
            //    maindirectory+ @"\WebSite" + " - " +
            //    this.Context.Parameters["apppoolname"]);

            this.CreateIISVirtualDir(this.Context.Parameters["webserverhost"],
                this.Context.Parameters["itrwebsitename"],
                maindirectory + @"\WebSite",
                this.Context.Parameters["apppoolname"],
                "",
                "");
        }
    }
}
